home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Examples / ProjectTemplates / Library / Makefiles / buildversion next >
Encoding:
Text File  |  1994-09-29  |  896 b   |  36 lines

  1. #! /bin/sh
  2. #
  3. # buildversion
  4. #
  5. # Script originally by Mike Ferris
  6. # Modified with permission for use in the MiscKit by Don Yacktman
  7. # Copyright (C) 1994 Don Yacktman
  8.  
  9. if [ ! $# -eq 7 ] ; then
  10.     echo "usage: buildversion filename proj_name proj_vers proj_rel file_name file_vers cflags"
  11.     echo "    filename is the version file to create."
  12.     echo "    proj_name is the name of the project."
  13.     echo "    proj_vers is the version of the project."
  14.     echo "    proj_rel is the release number of the project."
  15.     echo "    file_name is the file's name."
  16.     echo "    file_vers is the version number of the file."
  17.     echo "    cflags are the CFLAGS used to build the versioned file."
  18.     exit 1
  19. fi
  20.  
  21. PROJECT="$2 $3.$4 (lib$5.a)"
  22. DATE=`date`
  23. USER=`whoami`
  24.  
  25. rm -f $1
  26. cat > $1 <<EOF!
  27. static const char VersionString[] =
  28.     "$PROJECT: Version $6.  Built by $USER, $DATE.  CFLAGS: $7";
  29.  
  30. const char *$2_$5Version()
  31. {
  32.     return VersionString;
  33. }
  34.  
  35. EOF!
  36.